<template>
  <div @click="div">
    <a @click="fn" href="https://www.baidu.com/">去百度</a>
    <a @click.prevent="fn1" href="https://www.baidu.com/">去张宇</a>
    <!-- 阻止冒泡 -->
  <button @click.stop="btn">惦记我</button>
  
  
  
  
  
  </div>
</template>

<script>
export default {
data(){
  return{
    fn(e){
      e.preventDefault()

    },
fn1(){
  console.log('张宇');
},
btn(){
  console.log('冒泡');
},
div(){
  console.log('div');
}
  }
}
}
</script>

<style>

</style>